<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function fn() {
        console.log(111);
        console.log(this);
      }
      var o = {
        name: "jjj",
      };
      // fn()
      // call 调用函数
      // fn.call();
      fn.call(o); //将函数的this指向修改为o对象
    </script>
  </body>
</html>
